package com.mdb.open.trade.domain.dto.trade;


/*
* Copyright (C), 2017-2019 澳发科技(MDB)
* FileName: TfTradeFileCustomsInfoService.java
* Author:   you.yichao
* Date:     2019-08-08
* History:
* <author>          <time>          <version>          <desc>
* you.yichao         2019-08-08          V1.00             代码生成器初始生成代码
* -----------------------------------------------------------
* 作者姓名           修改时间           版本号            描述
*/

import com.mdb.bc.api.data.DataObjectBase;
import com.mdb.bc.validator.annotaion.validation.Num;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.*;
import java.time.LocalDateTime;

/**
* 类描述：
*  贸易档案报关信息表数据传输类
*
* @author you.yichao
* @date 2019-08-08
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TradeFileCustomsInfoDto", description="贸易档案报关信息表Dto对象")
public class TradeFileCustomsInfoDto extends DataObjectBase {

    private static final long serialVersionUID = 1L;

    /**
     * 融资档案海关编号
     */
    @ApiModelProperty(value = "融资档案海关编号", hidden = true)
    private String tradeFileCustomsNo;

    /**
     * 报关单号
     */
    @ApiModelProperty(value = "报关单号")
    @NotBlank(message = "报关单号不允许为空")
    @Size(max = 64, message = "报关单号最长为{max}位")
    private String customsNo;

    /**
     * 报关地点
     */
    @ApiModelProperty(value = "报关地点")
    @NotBlank(message = "报关地点不允许为空")
    @Size(max = 64, message = "报关地点最长为{max}位")
    private String customsLocation;

    /**
     * 报关抬头
     */
    @ApiModelProperty(value = "报关抬头")
//    @NotBlank(message = "报关抬头不允许为空")
    @Size(max = 64, message = "报关抬头最长为{max}位")
    private String customsTitle;

    /**
     * 报关金额
     */
    @ApiModelProperty(value = "报关金额")
    @NotBlank(message = "报关金额不允许为空")
    @Digits(integer = 13, fraction = 2, message = "报关金额要输入阿拉伯数字（包含小数点及小数点后两位最大16位）")
    @Num(regexp = "([1-9]\\d*+(.[0-9]{1,2})?)|(0\\.[0-9]{1,2})", message = "报关金额要为正数且小数点及小数点后两位最大16位")
    @Size(max = 20, message = "报关金额最长为{max}位")
    private String customsAmount;

    /**
     * 币种
     */
    @ApiModelProperty(value = "币种")
    @NotBlank(message = "币种不允许为空")
    @Size(max = 5, message = "币种最长为{max}位")
    private String ccy;

    /**
     * 报关时间
     */
    @ApiModelProperty(value = "报关时间")
    @NotNull(message = "报关时间不允许为空")
    private LocalDateTime commitTime;

    /**
     * 起运港
     */
    @ApiModelProperty(value = "起运港")
    @NotBlank(message = "起运港不允许为空")
    @Pattern(regexp = "^[A-Za-z0-9/\\-?:().,'+ ]+$", message = "起运港仅支持字母、数字及以下字符：/ - ? : ( ) . , ' + CrLf Space")
    @Size(max = 64, message = "起运港最长为{max}位")
    private String loadingPort;

    /**
     * 起运港代码
     */
    @ApiModelProperty(value = "起运港代码")
    @Size(max = 5, message = "起运港代码最长为{max}位")
    @Pattern(regexp = "^[A-Za-z0-9]{1,5}?$", message = "目的港代码需要输入英文或数字")
    private String loadingPortCode;

    /**
     * 目的港
     */
    @ApiModelProperty(value = "目的港")
    @NotBlank(message = "目的港不允许为空")
    @Pattern(regexp = "^[A-Za-z0-9/\\-?:().,'+ ]+$", message = "目的港仅支持字母、数字及以下字符：/ - ? : ( ) . , ' + CrLf Space")
    @Size(max = 64, message = "目的港最长为{max}位")
    private String destinPort;

    /**
     * 目的港代码
     */
    @ApiModelProperty(value = "目的港代码")
    @Size(max = 5, message = "目的港代码最长为{max}位")
    @Pattern(regexp = "^[A-Za-z0-9]{1,5}?$", message = "目的港代码需要输入英文或数字")
    private String destinPortCode;

    /**
     * 目的国
     */
    @ApiModelProperty(value = "目的国")
    @NotBlank(message = "目的国不允许为空")
    @Size(max = 5, message = "目的国最长为{max}位")
    private String destinCountry;

}
